package mycomp.chlor

import scaladuct.Starter
import scaladuct.Ref
import com.google.gdata.client.docs.DocsService
import java.util.ArrayList

/**
 * Created by IntelliJ IDEA.
 * User: zslajchrt
 * Date: 31.3.11
 * Time: 17:07
 * To change this template use File | Settings | File Templates.
 */

class SweetStarter extends Starter[String] {

  def newInstance() = phaseMakeItSweeter(new ArrayList[Starter[DocsService]], true)

  def phaseMakeItSweeter(@Ref(col = true) docs: java.util.List[Starter[DocsService]], flag: Boolean) = {
    val iter = docs.iterator
    val buf = new StringBuffer
    while (iter.hasNext) {
      val n = iter.next
      buf.append(n.toString)
    }
    buf.toString
  }

  def destroy(instance: String) = null

}